webScrapper = function()
	{
	return false;
	}
webScrapper.getURL = function(urlName,funName, myData)
	{
	//defined for buffering purposes
	if( !webScrapper.requestArr ) { webScrapper.requestArr = new Array(); }
	if( !webScrapper.numReq ) { webScrapper.numReq = 0; }
	if( !webScrapper.loopingBool ) { webScrapper.loopingBool = false; }
	    
	//edit function to be a function name	
	if (!funName){funName=webScrapper.getURL.console};
    if (typeof(funName)!=='function'){throw('it has to be a function itself, not a function name')};
	
	webScrapper.requestArr.push( ["http://sandbox1.mathbiol.org/geturl.php?url=" + urlName, funName, myData] );
	if( !webScrapper.loopingBool )
		{
		webScrapper.looping();
		}
	return false;
	}

//Buffering
webScrapper.looping = function()
	{
	webScrapper.loopingBool = true;
	var i = 0;
	while( webScrapper.requestArr.length > 0 && i < 10 )
		{
		if( webScrapper.numReq < 100 )
			{
			webScrapper.numReq++;
			webScrapper.getURL.getScriptBuffer(webScrapper.requestArr.shift());
			}
		i++;
		}
	//if( webScrapper.requestArr.length > 0 && !webScrapper.loopingBool ) {webScrapper.looping();}
	webScrapper.loopingBool = false;
	return false;
	}
webScrapper.getURL.getScriptBuffer = function( commandArr )
	{
	$.ajax
		(
			{
			url:commandArr[0], 
			dataType:"jsonp", 
			success:function(data) 
				{
				webScrapper.numReq--; 
				console.log('minusing');
				commandArr[1](data,commandArr[2]);
				}
			}
		);
	
	}
	
webScrapper.getURL.console = function(x) 
	{ 
	console.log(x); 
	}
